<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

	<h1>Dashboard</h1>
	<small>Volunteers Summary Dashboard</small>

	<h4>State wise Volunteers Report </h4>
    <div class="table-responsive">
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th> State </th>
                <th> Unique Volunteers</th>
            </tr>
        </thead>
        <tbody>
            <% int counter = 0; %>
            <c:forEach var="stateCount" items="${volunteersSummary.mapAllStatesVolunteersCount}">
            <tr>
               <td><%= ++counter %> </td>
               <td> <c:out value="${stateCount.key.getFullName()}" /></td>
               <td> <c:out value="${stateCount.value}" /></td>
            </tr>
            </c:forEach>
            <tr class="danger">
                <td colspan="2"> Total </td>
                <td> <c:out value="${volunteersSummary.getTotalVolunteers()}" /> </td>
            </tr>
        </tbody>
    </table>
    </div>
